Don't output leading zero for lat.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 22 Sep 2004 17:07:17 +0000 (17:07 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 22 Sep 2004 17:07:17 +0000 (17:07 +0000)
gpsbabel/nmea.c

index f8664afa843001a6e856dc8f49f3bcd9bcf86011..3b0f136ae4837def9465b55bb382b6bc72a72517 100644 (file)
@@ -396,7 +396,7 @@ nmea_wayptpr(const waypoint *wpt)
        lon = degrees2ddmm(wpt->longitude);
        s = mkshort(mkshort_handle, wpt->shortname);
 
-       snprintf(obuf, sizeof(obuf),  "GPWPL,%09.3f,%c,%09.3f,%c,%s", 
+       snprintf(obuf, sizeof(obuf),  "GPWPL,%08.3f,%c,%09.3f,%c,%s", 
                        fabs(lat), lat < 0 ? 'S' : 'N',
                        fabs(lon), lon < 0 ? 'W' : 'E', s
 
@@ -428,7 +428,7 @@ nmea_trackpt_pr(const waypoint *wpt)
                hms = 0;
        }
 
-       snprintf(obuf, sizeof(obuf), "GPGGA,%06d,%09.3f,%c,%09.3f,%c,04,0,0,%.3f,M,0.0,M,,",
+       snprintf(obuf, sizeof(obuf), "GPGGA,%06d,%08.3f,%c,%09.3f,%c,04,0,0,%.3f,M,0.0,M,,",
                        hms,
                        fabs(lat), lat < 0 ? 'S' : 'N',
                        fabs(lon), lon < 0 ? 'W' : 'E',